package com.lanyou.esb.redis.vo;

import java.util.Date;

import com.fasterxml.jackson.annotation.JsonIgnore;
import com.lanyou.esb.entity.Http;

/**
 * HTTP接口表
 * 
 * @author Davey.wu
 */
public class HttpVo {
	/** HTTP接口表ID **/
	private String id;

	/** 领域系统表ID **/
	private String systemId;

	/** 系统编码 **/
	private String systemCode;

	/** 接口名称 **/
	private String name;

	/** 接口编码 **/
	private String code;

	/** 是否公开 **/
	private String isPublic;

	/** 认证方式 **/
	private String authType;

	/** 接口类型 **/
	private String type;

	/** 接口描述 **/
	private String desc;

	/** 接口原始地址 **/
	private String priUrl;

	/** 接口发布地址 **/
	private String pubUrl;

	/** 接口版本 **/
	private String version;

	/** 接口状态 **/
	private String status;

	/** 接口请求的方法 **/
	private String method;

	/** 数据格式 **/
	private String dataFormate;

	/** 超时时长 **/
	private int overtimeTimes;

	/** 是否收费 **/
	private String isCost;

	/** 备注 **/
	private String remark;

	/** 审核状态 **/
	private String auditStatus;

	/** 审核意见 **/
	private String auditRemark;

	/** 请求参数报文 **/
	private String reqParaMess;

	/** 返回参数报文 **/
	private String retParaMess;

	/** 是否隔离 **/
	private String isIsolation;

	/** 是否开启跟踪模式 **/
	private String isTrace;

	/** 是否可用 **/
	private String isEnable;

	/** 创建人 **/
	private String creator;

	/** 创建时间 **/
	private Date createdDate;

	/** 最后更新人员 **/
	private String modifier;

	/** 最后更新时间 **/
	private Date lastUpdateDate;

	// getter and setter start======================
	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public String getSystemId() {
		return systemId;
	}

	public void setSystemId(String systemId) {
		this.systemId = systemId;
	}

	public String getSystemCode() {
		return systemCode;
	}

	public void setSystemCode(String systemCode) {
		this.systemCode = systemCode;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getCode() {
		return code;
	}

	public void setCode(String code) {
		this.code = code;
	}

	@JsonIgnore
	public String getIsPublic() {
		return isPublic;
	}

	public void setIsPublic(String isPublic) {
		this.isPublic = isPublic;
	}

	public String getAuthType() {
		return authType;
	}

	public void setAuthType(String authType) {
		this.authType = authType;
	}

	public String getType() {
		return type;
	}

	public void setType(String type) {
		this.type = type;
	}

	@JsonIgnore
	public String getDesc() {
		return desc;
	}

	public void setDesc(String desc) {
		this.desc = desc;
	}

	public String getPriUrl() {
		return priUrl;
	}

	public void setPriUrl(String priUrl) {
		this.priUrl = priUrl;
	}

	public String getPubUrl() {
		return pubUrl;
	}

	public void setPubUrl(String pubUrl) {
		this.pubUrl = pubUrl;
	}

	public String getVersion() {
		return version;
	}

	public void setVersion(String version) {
		this.version = version;
	}

	public String getStatus() {
		return status;
	}

	public void setStatus(String status) {
		this.status = status;
	}

	public String getMethod() {
		return method;
	}

	public void setMethod(String method) {
		this.method = method;
	}

	@JsonIgnore
	public String getDataFormate() {
		return dataFormate;
	}

	public void setDataFormate(String dataFormate) {
		this.dataFormate = dataFormate;
	}

	public int getOvertimeTimes() {
		return overtimeTimes;
	}

	public void setOvertimeTimes(int overtimeTimes) {
		this.overtimeTimes = overtimeTimes;
	}

	public String getIsCost() {
		return isCost;
	}

	public void setIsCost(String isCost) {
		this.isCost = isCost;
	}

	@JsonIgnore
	public String getRemark() {
		return remark;
	}

	public void setRemark(String remark) {
		this.remark = remark;
	}

	public String getAuditStatus() {
		return auditStatus;
	}

	public void setAuditStatus(String auditStatus) {
		this.auditStatus = auditStatus;
	}

	@JsonIgnore
	public String getAuditRemark() {
		return auditRemark;
	}

	public void setAuditRemark(String auditRemark) {
		this.auditRemark = auditRemark;
	}

	@JsonIgnore
	public String getReqParaMess() {
		return reqParaMess;
	}

	public void setReqParaMess(String reqParaMess) {
		this.reqParaMess = reqParaMess;
	}

	@JsonIgnore
	public String getRetParaMess() {
		return retParaMess;
	}

	public void setRetParaMess(String retParaMess) {
		this.retParaMess = retParaMess;
	}

	public String getIsIsolation() {
		return isIsolation;
	}

	public void setIsIsolation(String isIsolation) {
		this.isIsolation = isIsolation;
	}

	public String getIsEnable() {
		return isEnable;
	}

	public void setIsEnable(String isEnable) {
		this.isEnable = isEnable;
	}

	public String getCreator() {
		return creator;
	}

	public void setCreator(String creator) {
		this.creator = creator;
	}

	@JsonIgnore
	public Date getCreatedDate() {
		return createdDate;
	}

	public void setCreatedDate(Date createdDate) {
		this.createdDate = createdDate;
	}

	@JsonIgnore
	public String getModifier() {
		return modifier;
	}

	public void setModifier(String modifier) {
		this.modifier = modifier;
	}

	@JsonIgnore
	public Date getLastUpdateDate() {
		return lastUpdateDate;
	}

	public void setLastUpdateDate(Date lastUpdateDate) {
		this.lastUpdateDate = lastUpdateDate;
	}

	// getter and setter end======================
	@Override
	public String toString() {
		return "Http [id=" + id + ", systemId=" + systemId + ", systemCode="
				+ systemCode + ", name=" + name + ", code=" + code
				+ ", isPublic=" + isPublic + ", authType=" + authType
				+ ", type=" + type + ", desc=" + desc + ", priUrl=" + priUrl
				+ ", pubUrl=" + pubUrl + ", version=" + version + ", status="
				+ status + ", method=" + method + ", dataFormate="
				+ dataFormate + ", overtimeTimes=" + overtimeTimes
				+ ", isCost=" + isCost + ", remark=" + remark
				+ ", auditStatus=" + auditStatus + ", auditRemark="
				+ auditRemark + ", reqParaMess=" + reqParaMess
				+ ", retParaMess=" + retParaMess + ", isIsolation="
				+ isIsolation + ", isEnable=" + isEnable + ", creator="
				+ creator + ", createdDate=" + createdDate + ", modifier="
				+ modifier + ", lastUpdateDate=" + lastUpdateDate + "]";
	}

	public static HttpVo getInstance(Http http) {
		HttpVo httpVo = new HttpVo();
		httpVo.setAuditRemark(http.getAuditRemark());
		httpVo.setAuditStatus(http.getAuditStatus());
		httpVo.setAuthType(http.getAuthType());
		httpVo.setCode(http.getCode());
		httpVo.setCreatedDate(http.getCreateTime());
		httpVo.setCreator(http.getCreator());
		httpVo.setDataFormate(http.getDataFormate());
		httpVo.setDesc(http.getDesc());
		httpVo.setId(http.getId());
		httpVo.setIsCost(http.getIfCost());
		httpVo.setIsEnable(http.getIsEnable());
		httpVo.setIsIsolation(http.getIfOlation());
		httpVo.setIsPublic(http.getIfPublic());
		httpVo.setLastUpdateDate(http.getModifyTime());
		httpVo.setModifier(http.getModifier());
		httpVo.setName(http.getName());
		httpVo.setOvertimeTimes(Integer.parseInt(http.getOvertime()));
		httpVo.setPriUrl(http.getPriUrl());
		httpVo.setPubUrl(http.getPubUrl());
		httpVo.setReqParaMess(http.getRequestMess());
		httpVo.setRetParaMess(http.getReturnMess());
		httpVo.setStatus(http.getStatus());
		httpVo.setSystemCode(http.getSystemCode());
		httpVo.setSystemId(http.getFieldSystemId());
		httpVo.setType(http.getType());
		httpVo.setVersion(http.getVersion());

		httpVo.setIsTrace(http.getIsTrace());

		return httpVo;

	}

	public String getIsTrace() {
		return isTrace;
	}

	public void setIsTrace(String isTrace) {
		this.isTrace = isTrace;
	}

}
